Skip to content

Issue/736 add more warnings as errors#1052

Open
MartinHock wants to merge 24 commits into
ardalis:mainfrom
MartinHock:issue/736-add-more-warnings-as-errors
Open

Issue/736 add more warnings as errors#1052
MartinHock wants to merge 24 commits into
ardalis:mainfrom
MartinHock:issue/736-add-more-warnings-as-errors

Conversation

@MartinHock

Copy link
Copy Markdown
Contributor

removed the warnings that were appearing after latest-all was added to Directoy.build.props
and analysis was switched on

MartinHock and others added 24 commits June 8, 2026 16:30
- Set latest analysis level and adjust warning settings in Directory.Build.props
- Add Scalar API reference and improve exception handling in MiddlewareConfig
- Standardize cancellation token usage in endpoints
- Pass cancellation token to Task.Delay in NoOpMediator
Changed DisposeAsync in CustomWebApplicationFactory from new to override, added call to base.DisposeAsync, and suppressed finalization to ensure proper resource disposal and .NET best practices.
Ensure all int-to-string conversions for routes and logging use CultureInfo.InvariantCulture for consistent, culture-agnostic output across LoggerConfigs and contributor request files. This improves reliability in globalized scenarios.
Changed Constants to static and renamed fields to PascalCase.
Updated all usages to match new names across queries, endpoints,
DTOs, and validation to align with .NET standards.
Changed structured logging placeholders from lowercase to PascalCase across multiple files to improve consistency and align with .NET logging conventions.
Renamed constants to PascalCase for .NET convention compliance, updated all references, and removed an unused FastEndpoints using directive.
Changed entity filtering to use DomainEvents.Count != 0 instead of DomainEvents.Any() when dispatching events. This is a minor refactor with no functional impact.
- Use PascalCase {ContributorId} in logging for consistency
- Refactor BaseEfRepoTestFixture: private readonly _dbContext, add protected DbContext property
- Implement IDisposable and IAsyncDisposable for proper DbContext disposal
- Update EfRepositoryUpdate to use new DbContext property
CA1014 (CLS compliance) is now disabled by setting its severity to none, clarifying that CLS compliance is not required for this application or template repository.
Expanded and reorganized .editorconfig for C#/VB conventions and .NET rules. Updated .gitignore for SonarQube and VS artifacts. Modified Clean.Architecture.slnx to include .gitignore and adjust test config references. Added .runsettings for parallel xUnit test execution.
.editorconfig updated to suppress CA1014 and CA1707, and set CA1848 as a suggestion. Refactored DeleteContributorService to use a static LoggerMessage.Define delegate for contributor deletion logs, replacing direct LogInformation calls. No functional changes made.
The PhoneNumber property in CreateContributorRequest is now a nullable string without an explicit default value assignment. This simplifies the property declaration.
Updated DeleteContributorService summary and remarks to explain logging approach. Method now returns Result.Success() after deletion and event publication.
Update GetContributorQuery and related files to use the new Clean.Architecture.UseCases.Contributors.GetContributor namespace. Adjust using directives and references in handler and endpoint files for consistency.
Renamed ct to cancellationToken in UpdateContributorHandler for clarity and consistency. Changed NoOpMediator.CreateStream to a static method.
.editorconfig updated to disable CA1848 and CA1873 rules and clarify LoggerMessage usage is not enforced. Solution file now includes .editorconfig in /src/ to apply coding conventions and analyzer settings to all source projects.
Seal VogenEfCoreConverters class for stricter encapsulation

Changed VogenEfCoreConverters from internal partial to internal sealed partial, preventing inheritance and enforcing stricter encapsulation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants